import request from "@/utils/request";

export function allocation_index(params) {
  return request({
    url: "/allocation/index",
    method: "get",
    params
  });
}

export function allocation_add(data) {
  return request({
    url: "/allocation/add",
    method: "post",
    data: data
  });
}

export function allocation_getGoods(params) {
  return request({
    url: "/allocation/getGoods",
    method: "get",
    params
  });
}

export function allocation_getGoodsSpu(params) {
  return request({
    url: "/allocation/getGoodsSpu",
    method: "get",
    params
  });
}

// 导出SKU调拨
export function export_allocation_info(data) {
  return request({
    url: "/export/allocation",
    method: "post",
    responseType: "blob",
    data: data
  });
}

// 异步商品调拨
export function allocation_addDiff(data) {
  return request({
    url: "/allocation/addDiff",
    method: "post",
    data: data
  });
}

//分割关系列表
export function split_index(params) {
  return request({
    url: "/split_relationship/index",
    method: "get",
    params
  });
}
//分割关系添加
export function split_add(data) {
  return request({
    url: "/split_relationship/add",
    method: "post",
    data
  });
}
//分割关系编辑
export function split_edit(data) {
  return request({
    url: "/split_relationship/edit",
    method: "post",
    data
  });
}
//分割关系删除
export function split_del(data) {
  return request({
    url: "/split_relationship/delete",
    method: "post",
    data
  });
}

//添加白条关系
export function search_relationship(data) {
  return request({
    url: "/allocation/search_relationship",
    method: "post",
    data
  });
}

//保存白条关系
export function ious_add(data) {
  return request({
    url: "/allocation/ious_add",
    method: "post",
    data
  });
}

export function allocationExport(data) {
  return request({
    url: "/allocation/export",
    method: "post",
    responseType: "blob",
    data
  });
}
